Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext


~Dexter Kiboosioopsi 1.Dec.03 06:30 PM a Web browser
Domino Server All Releases All Platforms


By the way, I'm pretty much a newbie at LotusScript, so be gentle...

I have a web application that calls an agent on WebQuerySave. That agent calls another agent that is giving me problems. I am trying to send an email notification with the web link. Looking at my code, you can see that I have a few MSGBOX lines. I can get the "inside Sendmail" and docurl MSGBOX to display, but not the one in my IF statement. When the code is run I get an "Error 13: Type mismatch" displayed to the browser. Any clues? Thanks for any help.


Sub Sendmail
Msgbox "inside SendMail"

Dim s As NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim DocURL As String

Set s = New NotesSession
Set db = s.currentdatabase
Set view = db.getview("ContractsByNumber")
Set doc = view.GetLastDocument

DocURL = "http://hqapp01.comporium.com/workflow/cn2workflow.nsf/$All/"+ doc.universalid

Msgbox docurl

If doc.Status = "New" Then
Msgbox "status is new"
'The following section emails a link to the database to the intended recipient
Dim session As New NotesSession
Dim maildb As NotesDatabase
Dim maildoc As NotesDocument
Dim rtitem As NotesRichTextItem
Set session = New NotesSession
Set maildb = session.CurrentDatabase
Set maildoc = New NotesDocument( maildb )
Set rtitem = New NotesRichTextItem( maildoc, "Body" )
Call rtitem.AppendText ("The new contract may be viewed by clicking below.")
Call rtitem.AddNewLine( 2 )
Call rtitem.AppendText("Here is a link to the CN2 Contracts database: ")
Call rtitem.AppendDocLink( maildb, maildb.Title )
Call rtitem.AppendText("Open in web browser:")
maildoc.Form = "Memo"
maildoc.ReplyTo=doc.user
maildoc.SendTo = "Chris Whisonant/COMPORIUM"
maildoc.Subject = "New CN2 Contract"
Call maildoc.Send( False )
doc.Status="Submitted"
Call doc.Save (True, True)
Else
Msgbox "Error"

End If

Msgbox "completed sendmail"
End Sub






Type Mismatch (~Dexter Kiboosi... 1.Dec.03)
. . RE: Type Mismatch (~Justin Minlute... 1.Dec.03)
. . . . RE: Type Mismatch (~Dexter Kiboosi... 1.Dec.03)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS